import {defineStore} from 'pinia';

const data_product_requirements_definition = defineStore({
    id: 'data_product_requirements_definition',
    state: () => ({
        RawData:[],
        data_processing_check: [
            {
                name: '合规性检查',
                check: false,
                number: '1'
            },
            {
                name: '数据清洗',
                check: false,
                number: '2'
            },
            {
                name: '格式转换',
                check: false,
                number: '3'
            },
            {
                name: '交集',
                check: false,
                number: '4'
            },
            {
                name: '并集',
                check: false,
                number: '5'
            },
            {
                name: '笛卡尔积',
                check: false,
                number: '6'
            }
            ],
        data_application_check: [
            {
                name:'统计分析',
                check: false,
                number: '7'
            },
            {
                name:'算法计算',
                check: false,
                number: '8'
            },
            {
                name:'数据挖掘',
                check: false,
                number: '9'
            },
            {
                name:'大数据分析',
                check: false,
                number: '10'
            },
            {
                name:'隐私保护',
                check: false,
                number: '11'
            },
            {
                name:'机器学习',
                check: false,
                number: '12'
            }
        ],
        selected:[]
    }),
    // 开启数据缓存
    getters: {
        getDataProcessingCheck(state) {
            return state.data_processing_check;
        },
        getDataApplicationCheck(state) {
            return state.data_application_check;
        },
        getRawData(state) {
            return state.RawData;
        },
        getSelected(state) {
            return state.selected;
        }
    },
    actions: {
        setDataProcessingCheck(data_processing_check: any) {
            this.data_processing_check = data_processing_check;
        },
        setDataApplicationCheck(data_application_check: any) {
            this.data_application_check = data_application_check;
        },
        setRawData(RawData: any) {
            this.RawData = RawData;
        },
        setSelected(selected: any) {
            this.selected = selected;
        }
    },
    persist: true,
});

export default data_product_requirements_definition;